package com.example.arithmeticleetcode.leetcode.y2022.m3.test.retail;

import lombok.Data;

/**
 * 2
 *
 * @author: fangzhen@focusmedia.cn
 */
@Data
public class DistributeLocationInfo extends LocationInfo {
    /**
     * 档位
     * 0:优先项目, 1:[0, 1000], 2:[1000, 3000], 3:[3000, 5000], 4:[5000, ]
     */
    private int level;

    private Boolean alternate = Boolean.FALSE;

    public static DistributeLocationInfo of(LocationInfo info, int level) {
        return DistributeLocationInfo.of(info.getLocationId(), info.getBuildingId(), level);
    }

    public static DistributeLocationInfo of(long locationId, long buildingId, int level) {
        DistributeLocationInfo dis = new DistributeLocationInfo();
        dis.setLocationId(locationId);
        dis.setBuildingId(buildingId);
        dis.setLevel(level);
        return dis;
    }

    public static DistributeLocationInfo of(long locationId, long buildingId, Boolean alternate) {
        DistributeLocationInfo dis = new DistributeLocationInfo();
        dis.setLocationId(locationId);
        dis.setBuildingId(buildingId);
        dis.setAlternate(alternate);
        return dis;
    }
}
